import request from '@/utils/request'

// 格式转换列表
export function list(query) {
  return request({
    url: '/archive/conversionRules/list',
    method: 'get',
    params: query
  })
}

// 获取转换格式
export function getFormatType(query) {
  return request({
    url: '/archive/converyFormat/list',
    method: 'get',
    params: query
  })
}

// 转换格式删除接口
export function deleteList(ID) {
  return request({
    url: '/archive/conversionRules/'+ID,
    method: 'DELETE',
  })
}

// 新增
export function addRule(data) {
  return request({
    url: '/archive/conversionRules',
    method: 'post',
    data: data
  })
}

// 获取详情
export function getRule(id) {
  return request({
    url: '/archive/conversionRules/' + id,
    method: 'get'
  })
}

// 修改
export function updateRule(data) {
  return request({
    url: '/archive/conversionRules',
    method: 'put',
    data: data
  })
}
